package com.situ.mall.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.situ.mall.entity.Cart;
import com.situ.mall.entity.Suggest;

public interface SuggestMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Cart record);

    int insertSelective(Cart record);

    Suggest selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);

	List<Cart> selectByUserId(Integer id);

	int updateQuantity(@Param(value = "cartId")Integer cartId,@Param(value = "num") Integer num);

	int updateCheckStatus(@Param(value = "cartId")Integer cartId, @Param(value = "checked")Integer checked);

	Cart selectByUserIdAndProductId(@Param(value = "userId")Integer userId, @Param(value = "productId")Integer productId);

	int getTotalCount();

	List<Suggest> selectByPage(@Param(value = "offset")int offset, @Param(value = "limit")Integer limit);

	int updateByPrimaryKey(Integer id);

	int replyNow(Suggest suggest);

	List<Suggest> selectSuggestByUserId(Integer userId);


}